export default {
  date: {
    title: '数据总括',
    path: 'service/dw/statistics/received/daily', // /monthly | daily
    path_monthly: 'service/dw/statistics/received/monthly',
    x_axis: 'received_date',
    icon: 'arrow-graph-up-right',
    axis_label: true,
    // 开启时间轴设置，将会补全没有的时间
    date_axis: true,
    // labelText: '&nbsp;&nbsp;<small style="color:#91e4ff">点击节点钻取本日明细</small>',
    lines: [{
      code: 'received_money',
      name: '回款金额',
      show_value: false,
      type: 'line',
      average: true,
      format: 'money',
      color: '#93b7e3'
    }],
    fields: [{
      code: 'received_money',
      name: '回款金额'
    }, {
      code: 'received_date',
      name: '回款日期',
      vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
      type: 'date'
    }, {
      code: 'received_count',
      name: '数量'
    }],
    grid: {
      'containLabel': false,
      'top': '10%',
      'left': 60,
      'right': 20,
      'height': '32%',
      'bottom': 'auto'
    },
    grids: [{
      title: '数据总括',
      path: '/service/dw/cc/dialog/day',
      path_monthly: '/service/dw/cc/dialog/month',
      x_axis: 'period',
      timerange: 'period',
      post_data: {
        pageSize: 90
      },
      mark: 1,
      grid: {
        'containLabel': false,
        'top': '52%',
        'left': 60,
        'right': 20,
        'height': '20%',
        'bottom': 0
      },
      lines: [{
        code: 'dial_out_count',
        name: '外呼总数',
        color: '#516b91',
        label_offset: [0, -12]
      }, {
        code: 'dial_out_success_count',
        name: '外呼成功总数',
        show: true,
        color: '#59c4e6',
        attach: 1
      }, {
        code: 'dial_out_success_rate',
        name: '外呼成功率',
        type: 'line',
        show_value: true,
        unit: '%',
        color: '#a5e7f0',
        average: true
      }],
      fields: [{
        code: 'period',
        name: '月份',
        type: 'date'
      }, {
        code: 'dial_out_count',
        name: '外呼总数'
      }, {
        code: 'dial_out_success_count',
        name: '外呼成功总数'
      }, {
        code: 'dial_out_success_rate',
        name: '外呼成功率(%)'
      }, {
        code: 'call_len_count',
        name: '总时长(分)'
      }, {
        code: 'av_call_len_count',
        name: '平均时长(分)'
      }]
    }]
  },
  product: {
    title: '委托方统计',
    x_axis: 'asset_tenantry_name',
    labelText: '&nbsp;&nbsp;<small style="color:#50c3e8">点击节点钻取数据</small>',
    y_name: '回款金额',
    path: 'service/dw/statistics/received/asset/area',
    lines: [{
      code: 'received_money',
      name: '众信西安',
      show_value: false,
      type: 'bar',
      'stack': '总量',
      'branch': {
        area_id: '10007002'
      },
      show: true
    }, {
      code: 'received_money',
      name: '众信遵义',
      show_value: false,
      type: 'bar',
      'stack': '总量',
      'branch': {
        area_id: '10007003'
      },
      y_index: 0,
      show: true
    }, {
      code: 'received_money',
      name: '众信成都',
      show_value: false,
      type: 'bar',
      'stack': '总量',
      'branch': {
        area_id: '10007001'
      },
      y_index: 0,
      show: true
    }, {
      code: 'received_money',
      name: '其他',
      show_value: false,
      type: 'bar',
      'stack': '总量',
      'branch': {
        area_id: null
      },
      y_index: 0,
      show: true
    }],
    fields: [{
      code: 'asset_tenantry_id',
      name: '产品名称'
    },
      {
        code: 'received_money',
        name: '回款金额'
      }, {
        code: 'received_date',
        name: '回款日期',
        vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
        type: 'date'
      }, {
        code: 'received_count',
        name: '数量'
      }
    ],
    drill: [{
      title: '委托方数据 ${asset_tenantry_name}',
      path: 'service/dw/statistics/received/asset/daily', // /monthly | daily
      path_monthly: 'service/dw/statistics/received/asset/monthly',
      x_axis: 'received_date',
      axis_label: true,
      param: {
        asset_tenantry_id: 'asset_tenantry_id'
      },
      lines: [{
        code: 'received_money',
        name: '回款金额',
        show_value: false,
        type: 'line'
      }, {
        code: 'received_count',
        name: '数量',
        type: 'line'
      }],
      fields: [{
        code: 'received_money',
        name: '回款金额'
      }, {
        code: 'received_date',
        name: '回款日期',
        vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
        type: 'date'
      }, {
        code: 'received_count',
        name: '数量'
      }]
    }]
  },
  _product: {
    title: '产品统计',
    x_axis: 'asset_tenantry_id',
    path: 'service/dw/statistics/received/asset',
    /*
    path: 'service/dw/statistics/received/asset/daily',
    path_monthly: 'service/dw/statistics/received/asset/monthly',
    */
    lines: [{
      code: 'received_money',
      name: '回款金额',
      show_value: true,
      type: 'bar'
    }, {
      code: 'received_count',
      name: '数量',
      show: true,
      type: 'bar'
    }],
    fields: [{
      code: 'asset_tenantry_id',
      name: '产品名称'
    },
      {
        code: 'received_money',
        name: '回款金额'
      }, {
        code: 'received_date',
        name: '回款日期',
        vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
        type: 'date'
      }, {
        code: 'received_count',
        name: '数量'
      }
    ],
    drill: [{
      title: '产品数据 ${asset_tenantry_id}',
      path: 'service/dw/statistics/received/asset/daily', // /monthly | daily
      path_monthly: 'service/dw/statistics/received/asset/monthly',
      x_axis: 'received_date',
      axis_label: true,
      param: {
        asset_tenantry_id: 'asset_tenantry_id'
      },
      lines: [{
        code: 'received_money',
        name: '回款金额',
        show_value: false,
        type: 'line'
      }, {
        code: 'received_count',
        name: '数量',
        type: 'line'
      }],
      fields: [{
        code: 'received_money',
        name: '回款金额'
      }, {
        code: 'received_date',
        name: '回款日期',
        vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
        type: 'date'
      }, {
        code: 'received_count',
        name: '数量'
      }]
    }]
  },
  area: {
    title: '地区统计',
    x_axis: 'area_name',
    path: 'service/dw/statistics/received/area',
    lines: [{
      code: 'received_money',
      name: '回款金额',
      show_value: true,
      type: 'bar'
    }, {
      code: 'received_count',
      name: '数量',
      type: 'bar',
      show: true
    }],
    fields: [{
      code: 'area_name',
      area_name: '地区',
      default: '其他'
    }, {
      code: 'received_money',
      name: '回款金额'
    }, {
      code: 'received_date',
      name: '回款日期',
      vertical: false, // 竖排显示，用于标记在x轴上需要竖排显示的字段
      type: 'date'
    }, {
      code: 'received_count',
      name: '数量'
    }]
  }
}
